\newproblem{lay:6_2_16}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 6.2.16}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
	Let $\mathbf{y}=(-3,9)$ and $\mathbf{u}=(1,2)$. Compute the distance from $\mathbf{y}$ to the line through $\mathbf{u}$ and the origin.
}{
   % Solution
	Let's compute the first the projection of $\mathbf{y}$ onto $\mathbf{u}$.
	\begin{center}
		$\mathbf{y}_u=\frac{\mathbf{y}\cdot\mathbf{u}}{\mathbf{u}\cdot\mathbf{u}}\mathbf{u}=\frac{15}{5}\begin{pmatrix}1\\2\end{pmatrix}=3\begin{pmatrix}1\\2\end{pmatrix}=\begin{pmatrix}3\\6\end{pmatrix}$
	\end{center}
	
	The distance asked by the problem is the distance between $\mathbf{y}$ and $\mathbf{y}_u$:
	\begin{center}
		$d=\|\mathbf{y}-\mathbf{y}_u\|=\left\|\begin{pmatrix}-3\\9\end{pmatrix}-\begin{pmatrix}3\\6\end{pmatrix}\right\|=
		   \left\|\begin{pmatrix}-6\\3\end{pmatrix}\right\|=\sqrt{(-6)^2+3^2}=\sqrt{45}$
	\end{center}
}
\useproblem{lay:6_2_16}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}
